<?php


namespace app\admin\controller;


use app\admin\validate\BaseValidate;
use app\admin\model\Error as ErrorModel;
use Page\Page;
use think\facade\Request;

class Error extends BaseController
{
    public function index()
    {
        return $this->fetch('/error/index');
    }

    /**
     * 获取error分页接口
     * @return \think\response\Json
     */
    public function getAllError()
    {
        $get = Request::get();
        $model = new ErrorModel();
        $page = new Page($model, $get['page'], $get['limit'], [], ['add_time desc']);
        $data = $page->layuiPage();
        return json($data);
    }
}